/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package escom.ipn.modelo.facade;

import com.mysql.jdbc.Connection;
import escom.ipn.modelo.dao.adminMovilDAO;
import escom.ipn.modelo.dto.MovilClass;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author db2admin
 */
public class adminMovilFacade {
    private Connection cnn;
    private adminMovilDAO dao;

    public adminMovilFacade (Connection cnn) {
        this.cnn=cnn;
        dao= new adminMovilDAO ();
    }  
    public void guardar(MovilClass a)
            throws SQLException{
         dao.insertMovil(a, cnn);
    } 
    
    public void update(MovilClass a)
            throws SQLException{
         dao.updateMovil(a, cnn);
    }

    public List mostrarTodos()
            throws SQLException{
         return dao.loadAll(cnn);
    }

    public void borrarMovil(MovilClass a) throws SQLException{
          dao.borrarMovil(a,cnn);
    }

    public List loadSelect(MovilClass a) throws SQLException{
        return dao.loadSelect(a,cnn);
    }
    
}
